package com.mkz.storage.feign.fallback;

import org.springframework.stereotype.Component;

import com.mkz.core.common.constant.CommonConstants;
import com.mkz.core.common.util.ResponseResult;
import com.mkz.storage.feign.StorageClient;

import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
public class StorageClientFallback implements StorageClient {
	@Setter
	private Throwable cause;

	@Override
	public ResponseResult<Boolean> deduct(String commodityCode, Integer count) {
		log.error("处理库存失败，"+CommonConstants.ERROR_SHOW_TEXT, cause);
		return null;
	}
}
